package ink.metoo.gude.util

import com.github.houbb.sensitive.word.bs.SensitiveWordBs
import com.github.houbb.sensitive.word.support.allow.WordAllows
import com.github.houbb.sensitive.word.support.deny.WordDenys

object SensitiveWordUtils {

    val sensitiveWordBs: SensitiveWordBs = SensitiveWordBs.newInstance()
        .ignoreCase(true)
        .ignoreWidth(true)
        .wordDeny(WordDenys.defaults())
        .wordAllow(WordAllows.defaults())
        .init()

    fun replace(text: String): String = sensitiveWordBs.replace(text)

}